from pattern.circuit import Control


class entry(Control):
	
	def incoming(self, event):
		print event.data
		bridge = self.acquireInterface(event, "left:50%")
		if bridge is not None:
			command = ":" + event.trail.username + \
					"!localhost PRIVMSG " + \
					" ".join(event.data[0])
			destination = event.data[0][0]
			bridge.push(destination, command)
	

